package io.github.javpower.knowledgerag.core;

import java.io.IOException;
import java.util.List;

public class DocumentSplitter {
    public static void main(String[] args) {
        String documentPath = "src/main/resources/documents/your-document.txt";

        try {
            // 读取文档内容
            String documentContent = Tokenizer.readDocument(documentPath);

            // 综合分块方法
            List<String> blocks = new HybridBlockSplitter().split(documentContent, 1024);
            System.out.println("Blocks: " + blocks.size());
            blocks.forEach(System.out::println);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}